﻿@using NewLife;
@{
    //Layout = "_Ace_Layout.cshtml";
    Layout = "_Layout.cshtml";
    //Layout = NewLife.Cube.Setting.Current.Layout;

    //var context = ViewBag.Context as AuthorizationContext;
    var Resource = ViewBag.Resource;
    var Permission = (PermissionFlags)ViewBag.Permission;
    var pm = Permission.GetDescription();
    var menu = ViewBag.Menu as IMenu;
    if (menu == null) menu = Context.Items["CurrentMenu"] as IMenu;

    ViewBag.Title = String.Format("没有访问资源[{0}]的权限[{1}]", Resource, pm);
}
<div class="layui-fluid">
<div class="layadmin-tips">
<i class="layui-icon" face>&#xe664;</i>
<div class="layui-text" style="font-size: 20px;">
    <div class="panel-body" title="@(menu == null ? "" : menu.FullName)">
        <strong>
            <pre class="alert alert-danger" role="alert">访问资源 @Resource 需要 @pm 权限</pre>
        </strong>
    </div>
    <div class="panel-footer">
        <a href="~/Admin/User/Logout" class="btn btn-primary">
            <i class="ace-icon fa fa-power-off"></i>
            以其它身份登录
        </a>
        <a href="javascript: history.go(-1);" class="btn btn-info">返回上一页</a>
    </div>
</div>
</div>